<?php namespace App\Infra;

use App\Models\Collection;
use App\Utils\ModelOperatorTrait;

class CollectionManager{
	use ModelOperatorTrait;

	public function getCollections($conditions = null,$first = false){
		return $this->findModel(Collection::class,Collection::query(),$conditions,$first);
	}

	public function addCollection($data){
		$this->create(Collection::class,$data);
	}

	public function updateCollection($object,$data){
		$object->update($data);
	}
}